package com.zzx.web.controller;


import com.zzx.common.service.component.OrderComponent;
import com.zzx.common.web.bean.OrderInfoVO;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/order")
public class OrderController {

    @Reference
    private OrderComponent orderComponent;

    @GetMapping("/info")
    public OrderInfoVO getInfo(){
        OrderInfoVO orderInfoVO = new OrderInfoVO();
        BeanUtils.copyProperties(orderComponent.getInfo("1"), orderInfoVO);
        return orderInfoVO;
    }
}
